# import animal_demo
from animal_demo import Animal

# cat = animal_demo.Animal("橘色","猫","雌","大橘")
cat = Animal("橘色","猫","雌","大橘")
cat.to_String()
# print(cat.type)
# print(animal_demo.Animal.type)
# print(Animal.type)  # 类变量既可以通过类名访问也可以通过对象名访问

# print(cat.name)
# print(Animal.name)  # 实例变量不能用类名去访问，只能通过对象名访问

print(Animal.ethnic)
print(cat.ethnic)
# print(cat.account)

Animal.eat()
cat.eat()
Animal.sleep()
cat.sleep()